package com.mesnac.filemgr.biz;

import java.io.File;

import com.mesnac.filemgr.entity.FileInfor;

public class FileDirector {
	private AbFileMgr mgr;
	
	public FileDirector(AbFileMgr mgr){
		this.mgr = mgr;
	}
	/**
	 * 进行相关过程处理
	 * @param file
	 * @param parentPath
	 * @param oldname
	 * @param newname
	 * @param uploadfile
	 * @return
	 */
	public boolean execute(FileInfor file,String parentPath,String oldname,String newname,File uploadfile){
		if(mgr.dirMgr(file, parentPath, oldname, newname, uploadfile))
			return mgr.fileMgr(file, parentPath, oldname, newname, uploadfile);	
		return false;
	}
}
